//
//  Dog.m
//  P103
//
//  Created by 闫潇 on 14-10-13.
//  Copyright (c) 2014年 yan. All rights reserved.
//

#import "Dog.h"

@implementation Dog
-(id)init
{
    return [self initWithID:1];
    self = [super init];
    //super表示父类
    if (self) {
        ID =1;
        age =2;
        price = 60.0f;
        
    }
    return self;
}
-(id)initWithID:(int)newID
{
    return [self initWithID:newID andAge:2];
    self = [super init];
    if (self) {
        ID = newID;
        age = 2;
        price = 60.0f;
    }
    return self;
}

-(id)initWithID:(int)newID andAge:(int)newAge

{
    return [self initWithID:newID andAge:newAge andPrice:60.0f];
}

-(id)initWithID:(int)newID andAge:(int)newAge andPrice:(float)newPrice
{
    self = [super init];
    if (self) {
        ID = newID;
        age = newAge;
        price = newPrice;
    }
    return self;
    
}
-(void)setID:(int)newID
{
    ID = newID;
}
-(int)getID
{
    return ID;
}

-(void)setAge:(int)newAge
{
    age = newAge;
}
-(int)getAge
{
    return age;
}
-(void)setPrice:(float)newPrice
{
    price = newPrice;
}
-(float)getPrice
{
    return price;
}
-(void)setID:(int)newID andAge:(int)newAge
{
    ID = newID;
    age = newAge;
    
}
-(void)setID:(int)newID andAge:(int)newAge andPrice:(float)newPrice
{
    ID = newID;
    age = newAge;
    price = newPrice;
}
@end
